function VecResults=ExtractAffiliation(VecAffiliation,VecSpecialCharacters)

ValueTemp=find(VecAffiliation==';');
if size(ValueTemp,2)>0
    if size(VecAffiliation,2)-ValueTemp(1,end)<=2
        VecAffiliation=['; ' VecAffiliation];
    else
        VecAffiliation=['; ' VecAffiliation ';'];
    end
else
    VecAffiliation=['; ' VecAffiliation ';'];
end
    
ValueTemp=find(VecAffiliation==';');
for n1=1:size(ValueTemp,2)-1
    ValueTemp2=VecAffiliation(1,ValueTemp(1,n1)+2:ValueTemp(1,n1+1)-1);
    ValueTemp3=find(ValueTemp2==',');
    if size(ValueTemp3,2)>0
        ValueAffiliation=ValueTemp2(1,ValueTemp3(1,end)+2:end);
    else
        ValueTemp3=find(ValueTemp2~=' ');
        ValueAffiliation=ValueTemp2(1,ValueTemp3(1,1):end);
    end
    ValueTemp4='University of ';
    n2=1;
    TestTemp=0;
    while n2<=size(ValueAffiliation,2)-13&&TestTemp==0
        if strcmpi(ValueAffiliation(1,n2:n2+13),ValueTemp4)==1
            TestTemp=1;
        end
        n2=n2+1;
    end
    if TestTemp==1
        ValueAffiliation=ValueAffiliation(1,n2+13:end);
    else
        ValueTemp4=' University';
        n2=1;
        TestTemp=0;
        while n2<=size(ValueAffiliation,2)-10&&TestTemp==0
            if strcmpi(ValueAffiliation(1,n2:n2+10),ValueTemp4)==1
                TestTemp=1;
            end
            n2=n2+1;
        end
        if TestTemp==1
            ValueAffiliation=ValueAffiliation(1,1:n2-2);
        end
    end
    VecResults(1,n1)={ValueAffiliation};
    VecResults(2,n1)={TestTemp};
end